<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/new_activity.css"/>
    <title>我的订货郎</title>
    <script type="text/javascript">
    	var activityType = "${activityType}";
    </script>
</head>
<body onselectstart="return false">
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a class="now">商品</a>><a href="${pageContext.request.contextPath}/productActivity/listActivity">商品促销</a>><a class="now">${activityType}</a>><a class="now">修改活动价格</a>
            </p>
            <div class="tab clearfix">
                <div class="msg" id="msg" data-id="${productActivity.id}">活动信息</div>
                <div class="chose-product" id="chose-product" data-id="${productActivity.id}">添加活动商品</div>
                <div class="revise  active" id="revise" data-id="${productActivity.id}">修改活动价格</div>
            </div>
            <form class="revise-form" action="${pageContext.request.contextPath}/productActivity/listActivity">
                <div class="content revise-block" style="height: 700px">
                        <input id="productActivityId" type="text" value="${productActivityId }" style="display: none"/>
                    <div class="delete-more fr">批量删除</div>
                    <table>
                        <thead>
                        <tr>
                            <td><s></s></td>
                            <td>商品图片</td>
                            <td>商品名称</td>
                            <td>规格</td>
                            <td>标准</td>
                            <td>市场价</td>
                            <td>订货价</td>
                            <td>实际库存</td>
                            <td>促销特价</td>
                            <td>商品总量限制</td>
                            <td>每人限量</td>
                            <td></td>
                        </tr>
                        </thead>
                        <tbody>
                         <c:forEach var="productActivityProduct" items="${productActivityProductList }" >
                        <tr id="${productActivityProduct.productActivityProductId }">
                            <td><s></s></td>
                            <td>
                                <div>
                                    <img src="${pageContext.request.contextPath}/img/1.jpg"/>
                                </div>

                            </td>
                            <td>
                                <p>${productActivityProduct.code }</p>
                                <p>${productActivityProduct.productName }</p>
                                <p>${productActivityProduct.brandName }</p>
                            </td>
                            <td>${productActivityProduct.specNameValue}</td>
                            <td>${productActivityProduct.standard }</td>
                            <td>${productActivityProduct.price }/${productActivityProduct.littleUnit}</td>
                            <td>${productActivityProduct.orderedPrice }/${productActivityProduct.littleUnit}</td>
                            <td>${productActivityProduct.actualInvertory}${productActivityProduct.littleUnit}</td>
                            <td>
                                <input type="text" value="${productActivityProduct.activityPrice }"/>
                            </td>
                            <td>
                                <input type="text" value="${productActivityProduct.totalLimit }"/>
                            </td>
                            <td>
                                <input type="text" value="${productActivityProduct.personLimit }"  />
                            </td>
                            <td>
                                <button class="detail" onclick="productDetail(${productActivityProduct.id})">详情</button>
                                <button class="revise-product" >修改</button>
                                <button class="delete" onclick="deleteActivityProduct(${productActivityProduct.id},${productActivityId },this)">删除</button>
                            </td>
                        </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <div class="fix-btn">
                        <input type="button" value="上一步" onclick="window.history.go(-1)"/>
                        <input type="submit" class="submit" value="完成"/>
                    </div>
                </div>
            </form>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/new_activity.js"></script>
        <!--内容部分结束-->
    </div>
</div>

</body>
</html>